import axios from "axios";

const request = axios.create({
    baseURL: 'http://47.109.33.19:8080/api',
    // baseURL: 'http://127.0.0.1:4523/m1/4688279-4339928-default/api',
    timeout: 5000,
})

request.interceptors.request.use(
    config => {
        let token = sessionStorage.getItem('token')
        if (token) {
            config.headers['token'] = token
        }
        return config
    }, err => {
        console.log('err happened in file : request.js')
        return Promise.reject(err)
    }
)

export default request